package scene01_Home;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Paint;
import android.widget.Toast;
import baseClass.Global;
import baseClass.Sprite_Default;
import baseClass.Sprite_Touch;
import com.nPones.MainActivity;
import mainSrc.GlobalData;
import mainSrc.GlobalSaveData;
import mainSrc.MainDirector;
import pck_ImageLoader.ImageLoadManager;

public class Sprite_ButtonCharacter
  extends Sprite_Touch
{
  private boolean bIsActive = true;
  private int iSortOfBtn = 0;
  
  public Sprite_ButtonCharacter(int paramInt1, int paramInt2, int paramInt3, float paramFloat1, float paramFloat2, int paramInt4)
  {
    super(paramInt1, paramInt2, paramInt3, paramFloat1, paramFloat2);
    this.iSortOfBtn = paramInt4;
  }
  
  public String Make00Number(int paramInt)
  {
    if (paramInt >= 10) {
      return paramInt;
    }
    return "0" + paramInt;
  }
  
  public void SetButtonActive(boolean paramBoolean)
  {
    this.bIsActive = paramBoolean;
  }
  
  public void Touch_Down(float paramFloat1, float paramFloat2, MainDirector paramMainDirector)
  {
    if (this.bIsActive) {
      this.paint.setAlpha(100);
    }
  }
  
  public void Touch_DownAndUp(float paramFloat1, float paramFloat2, MainDirector paramMainDirector)
  {
    int i;
    if (this.bIsActive)
    {
      this.paint.setAlpha(255);
      i = (paramMainDirector.m_Scene01.m_Layer02.iPageNumber - 1) * 3 + this.iSortOfBtn + 1;
      switch (this.iSortOfBtn)
      {
      }
    }
    do
    {
      Object localObject;
      do
      {
        do
        {
          return;
          if (paramMainDirector.m_Scene01.m_Layer02.iPageNumber <= 1)
          {
            paramMainDirector.m_Scene01.m_Layer02.iPageNumber = paramMainDirector.m_Scene01.m_Layer02.iMaxPageNumber;
            return;
          }
          paramMainDirector = paramMainDirector.m_Scene01.m_Layer02;
          paramMainDirector.iPageNumber -= 1;
          return;
          if (paramMainDirector.m_Scene01.m_Layer02.iPageNumber >= paramMainDirector.m_Scene01.m_Layer02.iMaxPageNumber)
          {
            paramMainDirector.m_Scene01.m_Layer02.iPageNumber = 1;
            return;
          }
          paramMainDirector = paramMainDirector.m_Scene01.m_Layer02;
          paramMainDirector.iPageNumber += 1;
          return;
          if (paramMainDirector.m_Scene01.m_Layer02.bChar00Exist)
          {
            paramMainDirector.m_Scene01.m_Layer00.spd_btnCharacter.SetButtonActive(false);
            paramMainDirector.m_Scene01.m_Layer00.spd_btnExit.SetButtonActive(false);
            paramMainDirector.m_Scene01.m_Layer00.spd_btnOption.SetButtonActive(false);
            paramMainDirector.m_Scene01.m_Layer02.spb_Char00.SetButtonActive(false);
            paramMainDirector.m_Scene01.m_Layer02.spb_Char01.SetButtonActive(false);
            paramMainDirector.m_Scene01.m_Layer02.spb_Char02.SetButtonActive(false);
            paramMainDirector.m_Scene01.m_Layer02.spb_Left.SetButtonActive(false);
            paramMainDirector.m_Scene01.m_Layer02.spb_Right.SetButtonActive(false);
            paramMainDirector.m_Scene01.m_Layer02.spd_Illust.recycleBitmap();
            localObject = new ImageLoadManager();
            if (((ImageLoadManager)localObject).CheckDirectoryExists("Character" + Make00Number(i), "illust.png"))
            {
              ((ImageLoadManager)localObject).GetDirectory("Character" + Make00Number(i), "illust.png");
              localObject = BitmapFactory.decodeFile(((ImageLoadManager)localObject).GetDirectory("Character" + Make00Number(i), "illust.png"));
              paramMainDirector.m_Scene01.m_Layer02.spd_Illust.setBitmap((Bitmap)localObject);
            }
            for (;;)
            {
              GlobalData.GetInstance().character_num = i;
              paramMainDirector.m_Scene01.m_Layer02.ShowIllust();
              return;
              paramMainDirector.m_Scene01.m_Layer02.spd_Illust.setBitmap(2130837570);
            }
          }
        } while ((paramMainDirector.m_Scene01.m_Layer02.iPageNumber < 2) || (GlobalData.GetInstance().iFreeVersion != 1));
        if (GlobalSaveData.GetInstance().iLanguage == 0)
        {
          Toast.makeText(Global.GetInstance().m_activity.getApplicationContext(), "Free version supports only 3 slots", 0).show();
          return;
        }
        Toast.makeText(Global.GetInstance().m_activity.getApplicationContext(), "Free 버전에서는 3개의 캐릭터 슬롯만을 지원합니다.", 0).show();
        return;
        if (paramMainDirector.m_Scene01.m_Layer02.bChar01Exist)
        {
          paramMainDirector.m_Scene01.m_Layer00.spd_btnCharacter.SetButtonActive(false);
          paramMainDirector.m_Scene01.m_Layer00.spd_btnExit.SetButtonActive(false);
          paramMainDirector.m_Scene01.m_Layer00.spd_btnOption.SetButtonActive(false);
          paramMainDirector.m_Scene01.m_Layer02.spb_Char00.SetButtonActive(false);
          paramMainDirector.m_Scene01.m_Layer02.spb_Char01.SetButtonActive(false);
          paramMainDirector.m_Scene01.m_Layer02.spb_Char02.SetButtonActive(false);
          paramMainDirector.m_Scene01.m_Layer02.spb_Left.SetButtonActive(false);
          paramMainDirector.m_Scene01.m_Layer02.spb_Right.SetButtonActive(false);
          paramMainDirector.m_Scene01.m_Layer02.spd_Illust.recycleBitmap();
          localObject = new ImageLoadManager();
          if (((ImageLoadManager)localObject).CheckDirectoryExists("Character" + Make00Number(i), "illust.png"))
          {
            ((ImageLoadManager)localObject).GetDirectory("Character" + Make00Number(i), "illust.png");
            localObject = BitmapFactory.decodeFile(((ImageLoadManager)localObject).GetDirectory("Character" + Make00Number(i), "illust.png"));
            paramMainDirector.m_Scene01.m_Layer02.spd_Illust.setBitmap((Bitmap)localObject);
          }
          for (;;)
          {
            GlobalData.GetInstance().character_num = i;
            paramMainDirector.m_Scene01.m_Layer02.ShowIllust();
            return;
            paramMainDirector.m_Scene01.m_Layer02.spd_Illust.setBitmap(2130837570);
          }
        }
      } while ((paramMainDirector.m_Scene01.m_Layer02.iPageNumber < 2) || (GlobalData.GetInstance().iFreeVersion != 1));
      if (GlobalSaveData.GetInstance().iLanguage == 0)
      {
        Toast.makeText(Global.GetInstance().m_activity.getApplicationContext(), "Free version supports only 3 slots", 0).show();
        return;
      }
      Toast.makeText(Global.GetInstance().m_activity.getApplicationContext(), "Free 버전에서는 3개의 캐릭터 슬롯만을 지원합니다.", 0).show();
      return;
      if (paramMainDirector.m_Scene01.m_Layer02.bChar02Exist)
      {
        paramMainDirector.m_Scene01.m_Layer00.spd_btnCharacter.SetButtonActive(false);
        paramMainDirector.m_Scene01.m_Layer00.spd_btnExit.SetButtonActive(false);
        paramMainDirector.m_Scene01.m_Layer00.spd_btnOption.SetButtonActive(false);
        paramMainDirector.m_Scene01.m_Layer02.spb_Char00.SetButtonActive(false);
        paramMainDirector.m_Scene01.m_Layer02.spb_Char01.SetButtonActive(false);
        paramMainDirector.m_Scene01.m_Layer02.spb_Char02.SetButtonActive(false);
        paramMainDirector.m_Scene01.m_Layer02.spb_Left.SetButtonActive(false);
        paramMainDirector.m_Scene01.m_Layer02.spb_Right.SetButtonActive(false);
        paramMainDirector.m_Scene01.m_Layer02.spd_Illust.recycleBitmap();
        localObject = new ImageLoadManager();
        if (((ImageLoadManager)localObject).CheckDirectoryExists("Character" + Make00Number(i), "illust.png"))
        {
          ((ImageLoadManager)localObject).GetDirectory("Character" + Make00Number(i), "illust.png");
          localObject = BitmapFactory.decodeFile(((ImageLoadManager)localObject).GetDirectory("Character" + Make00Number(i), "illust.png"));
          paramMainDirector.m_Scene01.m_Layer02.spd_Illust.setBitmap((Bitmap)localObject);
        }
        for (;;)
        {
          GlobalData.GetInstance().character_num = i;
          paramMainDirector.m_Scene01.m_Layer02.ShowIllust();
          return;
          paramMainDirector.m_Scene01.m_Layer02.spd_Illust.setBitmap(2130837570);
        }
      }
    } while ((paramMainDirector.m_Scene01.m_Layer02.iPageNumber < 2) || (GlobalData.GetInstance().iFreeVersion != 1));
    if (GlobalSaveData.GetInstance().iLanguage == 0)
    {
      Toast.makeText(Global.GetInstance().m_activity.getApplicationContext(), "Free version supports only 3 slots", 0).show();
      return;
    }
    Toast.makeText(Global.GetInstance().m_activity.getApplicationContext(), "Free 버전에서는 3개의 캐릭터 슬롯만을 지원합니다.", 0).show();
  }
  
  public void Touch_RangeOut()
  {
    this.paint.setAlpha(255);
  }
}


/* Location:           D:\Tool\AndroidKiller_v1.3.1\projects\petdesigner\ProjectSrc\classes-dex2jar.jar
 * Qualified Name:     scene01_Home.Sprite_ButtonCharacter
 * JD-Core Version:    0.7.0.1
 */